package com.realtyManage.springboot.Service;

import com.realtyManage.springboot.Model.Do.Customer;
import com.realtyManage.springboot.Model.Do.CustomerRecord;
import com.realtyManage.springboot.Model.Vo.CustFlowEntity;
import com.realtyManage.springboot.Model.Vo.CustomerEntity;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;


public interface ICustomerService {

    Customer getCustomerDetail(Integer cid);

    Page<Customer> findPagedByWhereClause(CustomerEntity entity);

    boolean updateCustomerInfo(CustFlowEntity entity, HttpServletRequest request);

    List<Customer> findByTelephone(String telephone);

    List<Customer> findByTelephoneAndConnHouseIdAndStatus(String telephone,int connHouseId, int status);

    void updateKeepRecordInvalid(Customer customer);

    Customer insert(Customer entity);

    int countByConnUserIdAndType(Integer id, int type);

    int countByConnUserIdAndStatusNotAndStatusNot(Integer id, int status1, int status2);

    int countByConnUserIdAndState(Integer id, int state);

    void automaticBatchUpdateRecordByViewTime(int status);

    void automaticBatchUpdateRecordByKeepTime(int status);

    Page<Customer> findPagedByConnHouseId(int connHouseId, int pageNumber, int pageSize);

    List<String> findByNameLike(String businessManagerName);

    int countByConnUserIdAndStatusAndLastOperateDateBetween(Integer uid, int status, Date startTime, Date endTime);

    List<Customer>  getCustomerList(Integer houseId,String level);

    int updateReportedType(String customerId,String userName,String userId,Date approvalTime,String reportedType);

    String getName(String customerId);

    int addCustomerRecord(CustomerRecord customerRecord);

    int importCustomerList(MultipartFile file, HttpServletRequest request);
}
